import request from '@/utils/request';

const API = {
    // 文体预约记录
    WENTI_NOTE_URL: '/public/place/manager/sanction/list',
    // 查询文体预约
    INQUIRE_WENTI_NOTE_URL: '/public/place/info/list',
    // 获取文体列表
    GET_WENTI_LIST_URL: '/public/place/subscribe/getPlaceList?type=1'
};

// 查询审核中的文体申请预约
export const reqWentiNote = (pageNo, pageSize = 5) =>
    request.get(
        `${API.WENTI_NOTE_URL}?pageNo=${pageNo}&pageSize=${pageSize}&teamVerify=0&placeType=1&subscribeStatus=4`
    );

// 查询已处理的文体申请预约
export const reqWentiNoteProcessed = (pageNo, pageSize = 5) =>
    request.get(
        `${API.WENTI_NOTE_URL}?pageNo=${pageNo}&pageSize=${pageSize}&teamVerify=3&placeType=1&subscribeStatus=4`
    );

// 筛选查询文体申请
export const reqInquireWentiNote = (pageNo, pageSize = 5, type) =>
    request.get(
        `${API.INQUIRE_WENTI_NOTE_URL}?pageNo=${pageNo}&pageSize=${pageSize}&placeType=1&subscribeStatus=${type}`
    );

// 获取文体列表
export const reqGetWentiList = () =>
    request.get(API.GET_WENTI_LIST_URL, { timeout: 30000 });
